{{- if include "trivy.provider.enabled" $ }}
---
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
metadata:
  name: trivy-provider-webhook-server-cert
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "trivy-provider" "app.kubernetes.io/part-of" "gatekeeper")) | nindent 2 }}
data:
  tls.crt: {{ .Values.admissionPolicyEngine.internal.denyVulnerableImages.webhook.crt | b64enc | quote }}
  tls.key: {{ .Values.admissionPolicyEngine.internal.denyVulnerableImages.webhook.key | b64enc | quote }}
  ca.crt: {{ .Values.admissionPolicyEngine.internal.denyVulnerableImages.webhook.ca | b64enc | quote }}
{{- end }}
